hotels found matching search criteria: <?php echo count($results["hotels"]) ?><br>
<?php foreach($results["hotels"] as $hotel): ?>
<form method="post" action="book.php">
<h1><?php echo $hotel["extra"]["name"]?></h1>
<pre><?php echo $hotel["extra"]["description"]?></pre>
<input type="hidden" name="hotel_id" value="<?php echo $hotel["extra"]["hotel_id"]?>">
<input type="submit" value="Book">
<?php $room_n = 1 ?>
<?php foreach($hotel["room_sets"] as $room_set): ?>
  <h2>Room <?php echo $room_n ?></h2>
  <b>Adults: <?php echo $room_set["adults"] ?>
  Children: <?php echo $room_set["children"] ?></b>
  <?php if(isset($room_set["rooms"])): ?>
    <table>
    <?php foreach($room_set["rooms"] as $room): ?>
      <tr><td><?php echo $room["Type"]?> (<?php echo $room["Board"]?>)</td>
        <td><?php echo $hotel["currency"], " ", $room["Rate"]?></td>
        <td><input type="radio" name="room_id_<?php echo $room_n ?>" value="<?php echo $room["ID"]?>"></td>
      </tr>
    <?php endforeach ?>
    </table>
  <?php else: ?>
    <br>No suitable rooms found
  <?php endif ?>  
  <?php $room_n++ ?>
<?php endforeach ?>
</form>
<hr>
<?php endforeach ?>
<?php //var_dump($results); ?>
